package com.cy.store.service;

import com.cy.store.entity.Address;

import java.util.List;

/**
 * 收货地址的业务层接口
 */
public interface IAddressService {
    /**
     * 添加地址
     *
     * @param uid
     * @param username
     * @param address
     */
    public void addNewAddress(Integer uid, String username, Address address);

    /**
     * 显示收获地址
     *
     * @param uid
     * @return
     */
    public List<Address> getByUid(Integer uid);

    /**
     * 修改用户某个收货地址为默认地址
     *
     * @param aid
     * @param uid
     * @param username
     */
    public void setDefault(Integer aid, Integer uid, String username);

    /**
     * 删除地址
     *
     * @param aid
     * @param uid
     * @param username
     */
    public void delete(Integer aid, Integer uid, String username);

    /**
     * 修改收货地址
     */
    public void update(Integer aid, Integer uid, Address address, String username);

    /**
     * 用aid查询收货地址
     *
     * @param aid
     * @return
     */
    public Address findByAid(Integer aid, Integer uid);
}
